package mo.qmul.gemom;
/** COPYRIGHT DISCLAIMER
 * Synopsis: All the source codes presented in this document are intellectual
 * properties of Queen Mary, University of London.
 * 
 * @year 2010
 * @author Peng Jiang, John Bigham, Jiayi Wu Jinfu Wang------------QMUL
 * @version 1.0 
 * */
public class Util {
	
    public static String stripSlash(String text){
    	if(text.startsWith("/")){
    		text = text.substring(1,text.length());
    	}
    	if(text.endsWith("/")){
    		text = text.substring(0,text.length()-1);
    	}
        return text;
    	
    }
    
    public static String addSlash(String text){
    	if(!text.startsWith("/")){
    		text = "/"+text;
    	}
    	if(!text.endsWith("/")){
    		text = text+"/";
    	}
        return text;
    	
    }
    
    

}
